app.register.controller('onrolCtrl',['$scope','$location','$stateParams','$cookies', '$http',function ($scope,$location,$stateParams,$cookies,$http) {

    console.log($cookies.strTokenId,$cookies.nUserId,$stateParams.nEventId);

    $http({
        method:'POST',
        url:$config.host+'/api/events/EventSignUp',
        params:{
            nEventId : 388
        },
        headers: {TOKENID: $cookies.strTokenId,UID: $cookies.nUserId}
    }).success(function (data) {
        if(data.nFlag==1){
            console.log('报名成功')
        }else{
            console.log('报名失败')
            console.log(data.strMessage);
        }
    })

}]);